<div id="gridExample"></div>

<?php
	/* @var $headLink Zend_View_Helper_HeadLink */
	$headLink = $this->getHelper('HeadLink');
	$headLink->offsetSetStylesheet('ext-all-300', 'js/ext/resources/css/ext-all.css');

	/* @var $headScript Zend_View_Helper_HeadScript */
	$headScript = $this->getHelper('HeadScript');
	$headScript->offsetSetFile('1ext-base-300', 'js/ext/adapter/ext/ext-base.js')
			   ->offsetSetFile('2ext-all-300',  'js/ext/ext-all.js')

			   ->offsetSetFile('ext-ux-1',  'js/ext/ux/SlidingPager.js')
			   ->offsetSetFile('ext-ux-2',  'js/ext/ux/SliderTip.js')
			   ->offsetSetFile('ext-ux-3',  'js/ext/ux/PanelResizer.js')
			   ->offsetSetFile('ext-ux-4',  'js/ext/ux/PagingMemoryProxy.js');

	$renderer = new KontorX_DataGrid_Renderer_ExtGrid_Json(array(
		'url' => $this->url(array('format' => 'ext'))));
	
//		$store = new KontorX_Ext_Data_Store_Grouping();
//		$store->setGroupField('site_name');
//		$store->setSortInfo(array(
//			'field' => 'site_name',
//			'direction' => 'ASC'
//		));
//		$store->setReader($renderer->getStore()->getReader());
	
//	$renderer->setStore($store);

	$renderer->getGridPanel()
			 ->setTitle('Lista zdięć');

	$render = $this->grid->render($renderer)->render('gridExample');

	/* @var $inlineScript Zend_View_Helper_InlineScript */
	$inlineScript = $this->getHelper('InlineScript');
	$inlineScript->appendScript($render);